home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CBASE102.ARJ / INSTALL.BAT < prev    next >
DOS Batch File  |  1991-09-23  |  4KB  |  105 lines

  1. @echo off
  2. rem rolodeck installation batch file--------------------------------------------
  3. rem install.bat    1.5 - 91/09/23
  4.  
  5. rem ----------------------------------------------------------------------------
  6. rem NAME
  7. rem      install.bat - rolodeck installation batch file for DOS
  8. rem
  9. rem SYNOPSIS
  10. rem      install model [x]
  11. rem
  12. rem DESCRIPTION
  13. rem     install.bat performs the installation of the rolodeck program for
  14. rem     DOS.  model specifies the memory model as one of the following.
  15. rem
  16. rem          s        small model
  17. rem          m        medium model
  18. rem          c        compact model
  19. rem          l        large model
  20. rem          h        huge model
  21. rem
  22. rem     If specified, the second parameter causes the reference manual to
  23. rem     be extracted from the source code.  The reference manual is placed
  24. rem     in the file rolodeck.man.
  25. rem
  26. rem SEE ALSO
  27. rem      makefile
  28. rem
  29. rem NOTES
  30. rem      This batch file is written for use with Borland Turbo C.  To
  31. rem      convert it for use with another compiler, make the following
  32. rem      modifications:
  33. rem           1. Replace \usr\include with the include directory used by
  34. rem              the new compiler.
  35. rem           3. Replace tcc with the command to invoke the compiler being
  36. rem              used, replacing the switches also, if necessary.  Below
  37. rem              are listed the Turbo C switches used and their meanings.
  38. rem                   -c        compile but don't link
  39. rem                   -O        jump optimization
  40. rem                   -G        speed optimization
  41. rem                   -A        ANSI keywords only
  42. rem                   -C-       no nested comments
  43. rem                   -m        memory model
  44. rem
  45. rem ----------------------------------------------------------------------------
  46.  
  47. rem verify arguments------------------------------------------------------------
  48. if "%1" == "s" goto arg1
  49. if "%1" == "m" goto arg1
  50. if "%1" == "c" goto arg1
  51. if "%1" == "l" goto arg1
  52. if "%1" == "h" goto arg1
  53. echo usage:  install model [x]
  54. echo Valid values for model are s (small), m (medium), c (compact),
  55. echo   l (large), and h (huge).  Model must be lower case.
  56. echo If x is specified, the reference manual will be extracted.
  57. goto end
  58. :arg1
  59.  
  60. if "%2" == "" goto arg2
  61. if "%2" == "x" goto arg2
  62. echo usage:  install model [x]
  63. echo Invalid second argument.  Valid value is lowercase x.
  64. goto end
  65. :arg2
  66.  
  67. if "%3" == "" goto arg3
  68. echo usage:  install model [x]
  69. echo Too many arguments specified.
  70. goto end
  71. :arg3
  72.  
  73. rem check if required libraries installed---------------------------------------
  74. if exist \usr\include\cbase.h goto cbase
  75. echo The cbase library must be installed first.
  76. goto end
  77. :cbase
  78.  
  79. rem extract the reference manual------------------------------------------------
  80. if not "%2" == "x" goto skipman
  81. echo Extracting reference manual into rolodeck.man.
  82. if not exist rolodeck.man goto man
  83. echo rolodeck.man exists.  ^C to exit, any other key to continue.
  84. pause
  85. :man
  86. if not exist tmp goto tmp
  87. echo tmp exists.  ^C to exit, any other key to continue.
  88. pause
  89. :tmp
  90. echo on
  91. copy rolodeck.c/a+cvtss.c+fdcset.c+fml.c tmp
  92. type tmp | manx -c > rolodeck.man
  93. del tmp
  94. @echo off
  95. :skipman
  96.  
  97. rem make rolodeck program-------------------------------------------------------
  98. echo on
  99. tcc -c -O -G -C- -m%1 cvtss.c fdcset.c
  100. tcc -O -G -A  -C- -m%1 rolodeck.c fml.c cvtss.obj %1cbase.lib %1btree.lib %1lseq.lib %1blkio.lib
  101. @echo off
  102.  
  103. rem end of rolodeck installation batch file-------------------------------------
  104. :end
  105.